home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / misc / easylibs.readme < prev    next >
Encoding:
Text File  |  1994-10-08  |  4.5 KB  |  103 lines

  1. Short: Tools to simplify shared libraries
  2. Type: dev/misc
  3. Author: wiedmann@zdv.uni-tuebingen.de
  4. Uploader: wiedmann@zdv.uni-tuebingen.de
  5.  
  6.  
  7. This is EasyLibs 1.0, a package of tools and sources to create a shared
  8. library.
  9.  
  10. Programming shared libraries is often somewhat nasty: You have to create
  11. the library header which is done in Assembler (until now :-), you
  12. have to maintain FD files, prototypes, pragmas, autodocs and all that
  13. kind of stuff. EasyLibs is my try to do this with less work, even more:
  14. Most parts are created automatically.
  15.  
  16. EasyLibs consists of the following parts:
  17.  
  18.   - LibHeader.c 1.0, a complete and universal library header which can
  19.     be used for any type of library you want. Never again edit the
  20.     header, just change some preprocessor symbols! LibHeader.c is
  21.     written in C completely.
  22.  
  23.     LibHeader.c, however, can be used by the Dice compiler only. To be
  24.     precise: You need a possibility to put the resident structure into
  25.     the code segment.  Dice allows this by declaring the struct as
  26.     "const".
  27.  
  28.   - Xtract 1.1, a small tool which extracts prototypes, FD files and
  29.     Autodocs from source files. (I personally prefer "autodoc" from the
  30.     NDU for the latter purpose, however.)
  31.  
  32.   - fd2pragma 2.2, a program which can read FD files and convert them
  33.     into either pragma files for different compilers (Aztec, SAS, Dice,
  34.     Maxon), LVO files to be read by assemblers or function tables to
  35.     be read by LibHeader.c.
  36.  
  37.   - HelloWorld.library 40.1, a small shared library which shows how to
  38.     use these tools.
  39.  
  40.  
  41. Some notes on using LibHeader.c. (Some of them hold true for any library
  42. regardless of using LibHeader.c)
  43.  
  44.   - You might well use global data; either initialized or uninitialized,
  45.     but keep in mind that this is a *shared* library: Your data will be
  46.     shared by different tasks. In general one uses only things like
  47.     library base pointers or similar stuff in global data.
  48.  
  49.   - The startup code of LibHeader.c does *not* zero the BSS segment.
  50.     Unlike usual C programming you can not expect that variables are
  51.     0 or NULL, respectively, except if you force this by using something
  52.     like
  53.     struct IntuitionBase *IntuitionBase = NULL;
  54.  
  55.   - It is possible to use the small data model. However, you need to
  56.     setup the a4 register when entering the library. Best way to ensure
  57.     this is declaring all library functions which are visible to the
  58.     outside world as SAVEDS. (See HelloWorldLib.c)
  59.  
  60.   - Dice has the peculiarity to precede function names with an '@' instead
  61.     of the usual '_', if they expect arguments in registers. If they don't
  62.     expect arguments, however, Dice will use the '_' too. So always let
  63.     your library functions expect at least one argument, (The library base
  64.     pointer in a6 is a good choice.) even if you don't need it. The linker
  65.     will claim missing symbols otherwise.
  66.  
  67.  
  68. EasyLibs is in the public domain, use it as you want, but WITHOUT ANY
  69. WARRANTY. Bugs, suggestions, notes and beer bottles to
  70.  
  71.     Jochen Wiedmann
  72.     Am Eisteich 9
  73.     72555 Metzingen
  74.     Germany
  75.  
  76.     Phone: 07123 / 14881
  77.     Internet: wiedmann@zdv.uni-tuebingen.de
  78.  
  79.  
  80. ============================= Archive contents =============================
  81.  
  82. Original  Packed Ratio    Date     Time    Name
  83. -------- ------- ----- --------- --------  -------------
  84.     2858     791 72.3% 04-Jul-94 00:52:50  EasyLibs/DMakefile
  85.     3129    1526 51.2% 05-Jul-94 12:25:06  EasyLibs/EasyLibs.readme
  86.    28897    7152 75.2% 04-Jul-94 22:26:24  EasyLibs/fd2pragma.c
  87.     2988    1375 53.9% 05-Jul-94 12:27:02  EasyLibs/fd2pragma.readme
  88.      675     315 53.3% 04-Jul-94 14:36:54  EasyLibs/HelloWorld.c
  89.     2243     955 57.4% 04-Jul-94 22:46:06  EasyLibs/HelloWorldLib.c
  90.     1120     537 52.0% 23-Mar-94 09:29:22  EasyLibs/iprintf.a
  91.    11849    3956 66.6% 04-Jul-94 22:32:42  EasyLibs/LibHeader.c
  92.     6202    2355 62.0% 18-Apr-94 19:06:44  EasyLibs/Xtract.c
  93.       85      81  4.7% 06-Jul-94 21:40:14  EasyLibs/include/clib/HelloWorld_protos.h
  94.      122     111  9.0% 06-Jul-94 21:40:14  EasyLibs/include/fd/HelloWorld_lib.fd
  95.      326     184 43.5% 06-Jul-94 21:40:14  EasyLibs/include/pragmas/HelloWorld_pragmas.h
  96.      684     433 36.6% 06-Jul-94 21:40:44  EasyLibs/libs/HelloWorld.library
  97.    19880   11204 43.6% 06-Jul-94 21:39:56  EasyLibs/fd2pragma
  98.     6428    4150 35.4% 06-Jul-94 21:40:22  EasyLibs/HelloWorld
  99.      228     168 26.3% 06-Jul-94 21:40:22  EasyLibs/LibFuncTable.c
  100.    10592    6694 36.8% 06-Jul-94 21:39:36  EasyLibs/Xtract
  101. -------- ------- ----- --------- --------
  102.    98306   41987 57.2% 09-Jul-94 12:20:14   17 files
  103.